﻿@model App.Web.ViewModels.IndustryTypeViewModel
@using App.Web.Utility;

@{
    String pageTitle = "Edit Industry Type";
    if (Model != null && Model.ID == 0)
    {
        pageTitle = "Add New Industry Type";
    }
    ViewBag.Title = Html.GetPageTitle(pageTitle);

    String _CategoryButtonText = Model.ID > 0 ? "Change" : "Select";
    List<App.Web.ViewModels.CategoryViewModel> _Categories = ApplicationCache.Categories;
}

<div class="page-heading">
    <h1>@pageTitle</h1>
    <div>
        Add/Edit Industry Type.
    </div>
</div>

@Html.JavaScript("jquery.validate.min.js", Url)
@Html.JavaScript("jquery.validate.unobtrusive.min.js", Url)

@Html.Partial("_DatePicker")

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <div class="GroupBox">
	    @*<div class="GroupHeaderOverlay" style="width:145px;">IndustryTypeModel</div>*@

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        @*<div class="editor-label">            
            @Html.LabelFor(model => model.TestDate)
        </div>
        <div class="editor-field">            
            @Html.TextBoxFor(model => model.TestDate, new { @class = "datepicker"})
            @Html.ValidationMessageFor(model => model.TestDate)            
        </div>*@

        <p>
            <input type="submit" value="Save" />
        </p>
    </div>
}

<div class="GroupBox">
    @Html.AdminLink("Back to List", "List", "IndustryType")
</div>
